/*Copyright (C) 2013-2021 LZE*/
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll a[1000005] = {0},n,m,t,f[1000005];
int main(){
	scanf("%lld",&n);
	for(ll i = 1;i <= n;i++){
		scanf("%lld",&f[i]);
		a[i] = f[i] - f[i - 1];
	}
	scanf("%lld",&m);
	for(ll i = 1;i <= m;i++){
		ll x,y,num;
		scanf("%lld%lld%lld",&x,&y,&num);
		a[x] += num;
		a[y + 1] -= num;
	}
	for(ll i = 1;i <= n;i++){
		f[i] = a[i] + f[i - 1];
	}
	scanf("%lld",&t);
	for(ll i = 1;i <= t;i++){
		ll x; scanf("%lld",&x);
		printf("%lld\n",f[x]);
	}
	return 0;
}